<%@ page import="top.wuyang.study.javawebjdbc.workexam.TbExam" %>
<%@ page import="top.wuyang.study.javawebjdbc.workcp.TbCp" %>
<%@ page import="top.wuyang.study.javawebjdbc.workcp.TbCpDAO" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/6/3
  Time: 10:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加</title>
</head>
<body>

<%
    request.setCharacterEncoding("UTF-8");
    TbCp tbCp = new TbCp();
    tbCp.setChangshang( request.getParameter("changshang"));
    tbCp.setDnjj( request.getParameter("dnjj"));
    tbCp.setPrice( Integer.parseInt(request.getParameter("price")));
    TbCpDAO.insert(tbCp);
%>

<script>
    alert("添加成功")
    location.href = "list.jsp";
</script>

</body>
</html>
